package com.loading;

public abstract class Strategy {
    abstract int choose(int size,Object o) throws Exception;
    public int tryChoose(int size,Object o) throws Exception {
        if(size<=0) throw new Exception("Service has been cancelled");
        return choose(size,o);
    }

}
